function insertCleanWordPaste() {
	var node = document.getElementById("iframePaste").contentWindow.document.body;
	var html = CleanWord(node,true,true);
	kupu.resumeEditing();
	var range = kupu.getSelection().getRange();
	if (kupu.getBrowserName() == "IE") {
		range.pasteHTML(html);
	} else {
		var pasted = range.createContextualFragment(html);
		range.insertNode(pasted);
	}
	Lightbox.hideAll();
}

// based on FCK Editor
// Copyright (C) 2003-2007 Frederico Caldeira Knabben
function CleanWord(oNode, bIgnoreFont, bRemoveStyles) {
    var html = oNode.innerHTML;
    html = html.replace(/<o:p>\s*<\/o:p>/g, "");
    html = html.replace(/<o:p>.*?<\/o:p>/g, "&nbsp;");
    html = html.replace(/\s*mso-[^:]+:[^;"]+;?/gi, "");
    html = html.replace(/\s*MARGIN: 0cm 0cm 0pt\s*;/gi, "");
    html = html.replace(/\s*MARGIN: 0cm 0cm 0pt\s*"/gi, "\"");
    html = html.replace(/\s*TEXT-INDENT: 0cm\s*;/gi, "");
    html = html.replace(/\s*TEXT-INDENT: 0cm\s*"/gi, "\"");
    html = html.replace(/\s*TEXT-ALIGN: [^\s;]+;?"/gi, "\"");
    html = html.replace(/\s*PAGE-BREAK-BEFORE: [^\s;]+;?"/gi, "\"");
    html = html.replace(/\s*FONT-VARIANT: [^\s;]+;?"/gi, "\"");
    html = html.replace(/\s*tab-stops:[^;"]*;?/gi, "");
    html = html.replace(/\s*tab-stops:[^"]*/gi, "");
    if (bIgnoreFont) {
        html = html.replace(/\s*face="[^"]*"/gi, "");
        html = html.replace(/\s*face=[^ >]*/gi, "");
        html = html.replace(/\s*FONT-FAMILY:[^;"]*;?/gi, "");
    }
    html = html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3");
    html = html.replace(/<(\w[^>]*) size=([^ |>]*)([^>]*)/gi, "<$1$3");
    if (bRemoveStyles) {
        html = html.replace(/<(\w[^>]*) style="([^\"]*)"([^>]*)/gi, "<$1$3");
    }
    html = html.replace(/\s*style="\s*"/gi, "");
    html = html.replace(/<SPAN\s*[^>]*>\s*&nbsp;\s*<\/SPAN>/gi, "&nbsp;");
    html = html.replace(/<SPAN\s*[^>]*><\/SPAN>/gi, "");
    html = html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3");
    html = html.replace(/<SPAN\s*>(.*?)<\/SPAN>/gi, "$1");
    html = html.replace(/<FONT\s*>(.*?)<\/FONT>/gi, "$1");
    html = html.replace(/<\\?\?xml[^>]*>/gi, "");
    html = html.replace(/<\/?\w+:[^>]*>/gi, "");
    html = html.replace(/<\!--.*-->/g, "");
    html = html.replace(/<(U|I|STRIKE)>&nbsp;<\/\1>/g, "&nbsp;");
    html = html.replace(/<H\d>\s*<\/H\d>/gi, "");
    html = html.replace(/<(\w+)[^>]*\sstyle="[^"]*DISPLAY\s?:\s?none(.*?)<\/\1>/gi, "");
    html = html.replace(/<H(\d)([^>]*)>/gi, "<h$1>");
    html = html.replace(/<(H\d)><FONT[^>]*>(.*?)<\/FONT><\/\1>/gi, "<$1>$2</$1>");
    html = html.replace(/<(H\d)><EM>(.*?)<\/EM><\/\1>/gi, "<$1>$2</$1>");
    return html;
}